#HOST=127.0.0.1
#USER=root
#DBNAME=dyds
TEMP_FILE=temp.sql

read -p "Enter hostname : " HOST
read -p "Enter username : " USER
read -p "Enter database : " DBNAME
echo $USER@$HOST:$DBNAME

cat \
create_all_tables.sql \
insert_qadmin_user.sql \
insert_qadmin_group.sql \
insert_qadmin_resource.sql \
insert_qadmin_user_group.sql \
insert_qadmin_group_resource.sql \
> $TEMP_FILE

mysql -h $HOST -u $USER -p -D$DBNAME < $TEMP_FILE

rm $TEMP_FILE

